package juc.juccore.immutable;

/**
 * final变量
 */
public class FinalVariableDemo {
    //1.直接赋值
    //    private final int a=1;
    private final int a;

    //2.构造方法赋值
    public FinalVariableDemo(int a) {
        this.a = a;
    }

    //3.初始代码块赋值
  /*  {
        a=1;
    }*/
}
